/**
*@Author      ：anlzou
*@Date        ：4:50 2021/4/24
*@Github      ：https://github.com/anlzou
*@Description ：
*/
package com.anlzou.object;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * 注意使用slf4j配置'log4j.properties'
 */
public class ObjectBorn2 {

    private static final Logger logger = LoggerFactory.getLogger(ObjectBorn2.class);

    // 1.静态变量初始化
    static String staticWord = "hello";

    // 2.静态代码块
    static  {
        logger.info("staticWord = "+staticWord);
    }

    public ObjectBorn2(){
        logger.info("father construct method invoke...");
    }

    public static class Son2 extends ObjectBorn2{
        static  {
            logger.info("son staticWord init in static");
        }
        public Son2(){
            logger.info("son construct method invoke...");
        }
    }

//    public static void main(String[] args) {
//        Son2 son2 = new Son2();
//    }
}
